<?php
/**
 * Created by PhpStorm.
 * User: Adminstratot
 * Date: 2018/11/2
 * Time: 20:13
 */
namespace Admin\Model;
use Think\Model;

class FileModel extends Model{
    protected $connection = 'DB_DATA';//连接默认数据库时不写即可

    protected $trueTableName='file';
    protected $InsertFields='cid,intro,label';

    protected $_auto = array(
        array('time','time',3,'function'),
    );

    protected $_validate = array(
        array('intro','1,50','文件描述长度不符合要求!',1,'length',3),
        array('label','1,50','文件标签长度不符合要求!',1,'length',3),
    );
}
?>